/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Hochschule Heilbronn
 * License Type: Academic
 */
package de.hhn.pmt.tour.u6;

public class Event {
	public Event() {
	}

	public boolean equals(Object aObj) {
		if (aObj == this)
			return true;
		if (!(aObj instanceof Event))
			return false;
		Event event = (Event) aObj;
		if ((getBezeichnung() != null && !getBezeichnung().equals(
				event.getBezeichnung()))
				|| (getBezeichnung() == null && event.getBezeichnung() != null))
			return false;
		return true;
	}

	public int hashCode() {
		int hashcode = 0;
		hashcode = hashcode
				+ (getBezeichnung() == null ? 0 : getBezeichnung().hashCode());
		return hashcode;
	}

	private void this_setOwner(Object owner, int key) {
		if (key == de.hhn.pmt.tour.u6.ORMConstants.KEY_EVENT_LOCATION) {
			this.location = (de.hhn.pmt.tour.u6.Location) owner;
		}
	}

	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}

	};

	private String bezeichnung;

	private de.hhn.pmt.tour.u6.Location location;

	private int dauer;

	private java.util.Date startZeit;

	private java.util.Date endZeit;

	private String information;

	private boolean highlight;

	public void setDauer(int value) {
		this.dauer = value;
	}

	public int getDauer() {
		return dauer;
	}

	public void setStartZeit(java.util.Date value) {
		this.startZeit = value;
	}

	public java.util.Date getStartZeit() {
		return startZeit;
	}

	public void setEndZeit(java.util.Date value) {
		this.endZeit = value;
	}

	public java.util.Date getEndZeit() {
		return endZeit;
	}

	public void setBezeichnung(String value) {
		this.bezeichnung = value;
	}

	public String getBezeichnung() {
		return bezeichnung;
	}

	public String getORMID() {
		return getBezeichnung();
	}

	public void setInformation(String value) {
		this.information = value;
	}

	public String getInformation() {
		return information;
	}

	public void setHighlight(boolean value) {
		this.highlight = value;
	}

	public boolean getHighlight() {
		return highlight;
	}

	public void setLocation(de.hhn.pmt.tour.u6.Location value) {
		if (location != null) {
			location.event.remove(this);
		}
		if (value != null) {
			value.event.add(this);
		}
	}

	public de.hhn.pmt.tour.u6.Location getLocation() {
		return location;
	}

	/**
	 * This method is for internal use only.
	 */
	public void setORM_Location(de.hhn.pmt.tour.u6.Location value) {
		this.location = value;
	}

	private de.hhn.pmt.tour.u6.Location getORM_Location() {
		return location;
	}

	public String toString() {
		return String.valueOf(getBezeichnung());
	}

}
